#include "tcp_server.hpp"
#include <memory>

void Usage(const char *proc)
{
    std::cout << "\nServer Usage# " << proc << " ServerPort\n" << std::endl;
}

int main(int argc, const char **argv)
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(1);
    }

    std::unique_ptr<TcpServer> ptr_srv(new TcpServer(atoi(argv[1])));
    ptr_srv->init();
    ptr_srv->start();

    return 0;
}
